#include "WinCMDUtil.h"

#include <QProcess>

WinCMDUtil::WinCMDUtil()
{

}

QString WinCMDUtil::doCmd(const QString& cmd, const QStringList& parameters)
{
    if (cmd.isEmpty()) return "";

    QProcess process;
    process.start(cmd, parameters);

    process.waitForFinished();
    QByteArray output = process.readAllStandardOutput();

    return QString::fromLocal8Bit(output);
}
